package edu.sctu.practice.class02.lvchang.assign03.test2;

/**
 * Created by Administrator on 2015/10/23.
 */
public class RunMain {

    public static void main(String[] args) {

        ComparableCircle circle= new ComparableCircle(3.8);
        ComparableCircle circle1=new ComparableCircle(2.3);

        Comparable comparable = Max.max(circle, circle1);
        System.out.println("第一个Circle的面积为：" + circle.findArea());
        System.out.println("第二个Circle的面积为：" + circle1.findArea());
        System.out.println("两个圆中面积较大的是：" +((Circle) comparable).findArea());


        System.out.println("*************************");
        ComparableCylinder cylinder=new ComparableCylinder(2,3);
        ComparableCylinder cylinder1=new ComparableCylinder(10,2);

        Comparable comparable1 = Max.max(cylinder, cylinder1);
        System.out.println("第一个Cylinder的面积为：" + cylinder.findArea());
        System.out.println("第二个Cylinder的面积为：" + cylinder1.findArea());
        System.out.println("两个圆柱中面积较大的是：" + ((Circle) comparable1).findArea());


    }
}
